import { createRouter, createWebHistory } from 'vue-router'
import Login from '../components/login.vue'
import index from '../components/index.vue'
import household from '../components/household.vue'
import notice1 from '../components/notice1.vue'
import stranger from '../components/stranger.vue'
import message from '../components/message.vue'
import notice2 from '../components/notice2.vue'
import material from '../components/material.vue'
import robotChat from '../components/robotChat.vue'

const routes = [
  {
    path:'/',
    name:'login',
    component:Login
  },
  {
    path:'/index',
    name:'index',
    component:index,
    children:[
      {
        path:'/household',
        name:'household',
        component:household
      },
      {
        path:'/notice1',
        name:'notice1',
        component:notice1
      },
      {
        path:'/stranger',
        name:'stranger',
        component:stranger
      },
      {
        path:'/message',
        name:'message',
        component:message
      },
      {
        path:'/notice2',
        name:'notice2',
        component:notice2
      },
      {
        path: '/material',
        name: 'material',
        component:material
      },
      {
        path: '/robotChat',
        name: 'robotChat',
        component:robotChat
      },
    ]
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
